/////////////////////////////////////////////////////////////////////////
//
// Amuse Engine SDK - core/memory
// Copyright( c) 2013.  All Rights Reserved
//
// File:		AEPropertyBase.h
// Author:		Gianluca Belardelli
// Date:		07/05/2014
//
/////////////////////////////////////////////////////////////////////////
#ifndef _AEPROPERTYBASE_H_
#define _AEPROPERTYBASE_H_

#define MAX_PROPNAME_LEN	31

class AEPropertyBase
{
// Members
public:
	enum AEPropertyFlags
	{
		AEPF_READ			= 1,
		AEPF_WRITE			= 2,
		AEPF_TEMP			= 4,
		AEPF_READONLY		= 8,
		AEPF_DEFAULT		= AEPF_READ | AEPF_WRITE
	};

protected:
	char			*m_lpName;
	char			*m_lpDescription;
	char			*m_lpTypeName;

	AEPropertyFlags	m_pfFlags;

// Methods
public:
	AEPropertyBase( void ) : m_lpName(0L) {	m_lpName = new char[MAX_PROPNAME_LEN]; }
	virtual ~AEPropertyBase( void ) { delete [] m_lpName; };

	AE_FORCEINLINE void SetPropertyName( const char *lpName );
	AE_FORCEINLINE const char *GetPropertyName( void ) const;

	AE_FORCEINLINE void SetPropertyFlags( AEPropertyFlags pfFlags );
	AE_FORCEINLINE AEPropertyFlags GetPropertyFlags( void );

	virtual AEBOOL32 FromString( const char *lpStr ) = 0;
	virtual char *ToString( void ) = 0;
	virtual char *GetPropertyValue( void ) = 0;
	virtual void Destroy( void ) = 0;

};

#endif // _AEPROPERTYBASE_H_
